#pragma once
#include <map>
#include <memory>
#include "InterFaceUIMain.h"
#include "..\ModRun\InterfaceModRunCreate.h"
#include "..\..\Gof23\Gof_Singleton\Singleton11T.h"

//主界面管理类;
class CMainUIManage : public Singleton11T<CMainUIManage>
{
public:
    CMainUIManage();
    ~CMainUIManage();

    //初始化信息;
    void InitData(IUIElement* pElement);

    //显示对应的主界面;
    void DisplayMain(EnumMainStatus emStatus);

    //获取StatusInfo;
    std::shared_ptr<IUIMainStatus> GetMainStatus(EnumMainStatus emStatus);

    //设置StatusInfo;
    void SetMainStatus(EnumMainStatus emStatus, std::shared_ptr<IUIMainStatus> status);

    //获取currentStatus;
    std::shared_ptr<IUIMainStatus> GetCurrentMainStatus();

    //设置currentStatus;
    void SetCurrentMainStatus(EnumMainStatus status);

    //设置currentStatus;
    void SetCurrentMainStatus(std::shared_ptr<IUIMainStatus> status);

    //设置最后点击的设计模式;
    void SetLastModel(EnumModRun emModel);

    //获取最后点击的设计模式;
    EnumModRun GetLastModel();

private:

    //最后点击的模式按钮;
    EnumModRun m_lastModel;

    //正在显示的主界面类;
    std::shared_ptr<IUIMainStatus> m_CurrentMainUI;
    
    //主界面状态类存储;
    std::map<EnumMainStatus, std::shared_ptr<IUIMainStatus>> m_mapMainStatus;

    ////////////////////////////////////////////////////////////////////////////////////
    //总显示界面;
    std::shared_ptr<IUIMainStatus> m_statusAll;
    //Mod显示界面;
    std::shared_ptr<IUIMainStatus> m_statusMod;
};

